<template>
  <NCard class="nv-crud__simple-layout">
    <NFlex
      v-if="searchVisible || option.actionbar !== false"
      align="end"
      justify="space-between"
      style="gap: 0 0; padding-bottom: 10px;"
    >
      <slot v-if="searchVisible" name="search" />

      <slot name="actionbar" />
    </NFlex>
    <slot name="multi-select-bar" />
    <slot name="table" />
  </NCard>
</template>

<script setup lang="ts">
import type { NvCrudLayoutProps } from './types'
import { NCard, NFlex } from 'naive-ui'

defineProps<NvCrudLayoutProps>()
</script>

<style lang="scss">
.nv-crud__simple-layout {
  margin-bottom: 10px;
  & > .n-card__content:first-child {
    padding-top: 10px;
  }
}
</style>
